package com.shop.operator.service;

import java.util.List;
import java.util.Map;

import com.shop.domain.PageResult;
import com.shop.domain.SpecificationCustom;
import com.shop.model.Specification;

/**
 * 规格管理
 * @author Administrator
 *
 */
public interface SpecificationService {

	/**
	 * 查找所有的规格
	 * @return
	 * @throws Exception
	 */
	public List<Specification> findAll() throws Exception;
	
	/**
	 * 根据规格名称进行模糊查找
	 * @param specName
	 * @return
	 * @throws Exception
	 */
	public PageResult findPage(String specName,int pageNum,int pageSize)throws Exception;
	 
	/**
	 * 规格管理分页
	 * @param pageNum 当前页码
	 * @param pageSize 每页记录数
	 * @return
	 */
	public PageResult findPage(int pageNum,int pageSize );
	
	/**
	 * 增加规格
	 * @param specificationCustom
	 */
	public void add(SpecificationCustom specificationCustom)throws Exception;
	
	/**
	 * 根据规格名称进行查找
	 * @param specName
	 * @return
	 * @throws Exception
	 */
	public List<Specification> findName(String specName)throws Exception;
	
	/**
	 * 根据id查找对象
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public SpecificationCustom findOne(long id)throws Exception;
	
	/**
	 * 更新
	 * @param specificationCustom
	 * @throws Exception
	 */
	public void update(SpecificationCustom specificationCustom)throws Exception;
	
	/**
	 * 批量删除
	 * @param ids
	 * @throws Exception
	 */
	public void delete(long[] ids)throws Exception;

	/**
	 * 分类查找中获取List<Map>形式的下拉列表信息
	 * @return
	 */
	List<Map> findSpecList();
	
	
	
}
